<?php

class Product extends AppModel{
    
     public $validate = array('nombre'=>array(
                                'rule'=>'notEmpty'));
    public $displayField = 'nombre';
    public $hasAndBelongsToMany = array(
            'Promotion' => array (
                'className' => 'Promotion',
                'foreignKey'=> 'promotion_id',
                'dependent' => true
            
                ) 
            );  
        
    //public $displayField = 'nombre';
    //public $belongsTo = array(
    //        'Promotion' => array (
    //            'className' => 'Promotion',
    //            'foreignKey'=> 'promotion_id',
    //            'dependent' => true
            
    //            ) 
    //        );
}
